Ext.onReady(function(){
	checkProjectName();
	Ext.BLANK_IMAGE_URL = '/js/extjs/resources/images/default/s.gif';
	Ext.form.Field.prototype.msgTarget = 'under';
	Ext.MessageBox.buttonText.yes = "Si";
	Ext.MessageBox.buttonText.no = "No";	
	Ext.LoadMask.prototype.msg = "Cargando...";
	Ext.QuickTips.init();
	getNombreProyecto();
	
	var project_name = getProjectName();
	var formPanelPROD = generateForm('/' + project_name + '/products/new', dsPROD);	
	var url_clientrequirements = 'reqcliente.html?project=' + project_name;
	var url_productrequirement = 'reqsistema.html?project=' + project_name;
	var url_products = 'productos.html?project=' + project_name;
	var url_trazabilidad = 'traza.html?project=' + project_name;
	
	var viewport = new Ext.Viewport({
			layout: 'border',
			items: [				
				new Ext.Panel({ 
						id: 'north-panel',
						region:'north',
						contentEl: 'header',
						buttonAlign: 'center',
						bbar:['->',
							{ iconCls: 'icon-cliente', text: 'Requerimientos de Cliente', handler: function() { ir(url_clientrequirements);}},
							'-',
							{ iconCls: 'icon-sistema', text: 'Requerimientos de Sistema', handler: function() {ir(url_productrequirement);}},
							'-',
							{ iconCls: 'icon-productos', text: 'Productos', handler: function() {ir(url_products);}, pressed: true},
							'-',
							{ iconCls: 'icon-traza', text: 'Trazabilidad', handler: function() {ir(url_trazabilidad);}}
							]
						
				}),
				{
				region:'east',
				id: 'east-panel',
				collapsible: true,
				split:true,
				width: 300,
				minSize: 250,
				maxSize: 400,
				margins:'0 5 0 0',
				items: new Ext.TabPanel({
					id: 'tab-panel',
					border: false,
					activeTab: 0,
					items: [{
						html: '<div>Aca el Resumen</div>',
						title: 'Resumen',
						autoScroll: true
						},
						{
						items: formPanelPROD,
						title: 'Agregar',
						autoScroll: true							
						}
						]
					
					})
				},					
				new Ext.Panel({
				region:'center',
				id: 'center-panel',
				title: '',
				layout: 'fit',
				split:true,
				items: gridPROD
				})
			]	
	});
});



			

